﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ClassModel;
using ClassCommon;
using ClassDAL;

namespace ClassBLL
{
    public class t_class_user_fileupalod_BLL
    {
        /// <summary>
        /// 插入用户上传文件
        /// </summary>
        /// <param name="fileupload"></param>
        /// <returns>返回文件在数据库的ID</returns>
        public static int InsertFileUpload(t_class_fileupload fileupload)
        {
            return t_class_user_fileupalod_DAL.InsertUpload(fileupload);
        }


         /// <summary>
        /// 根据任务ID获取用户上传的excel表格。
        /// </summary>
        /// <param name="taskId"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static t_class_fileupload GetExcelFileWithTaskId(int taskId, int userid)
        {
            return t_class_user_fileupalod_DAL.GetExcelFileWithTaskId(taskId, userid);
        }


        /// <summary>
        /// 这个文件都是当前登录用户的吗？
        /// </summary>
        /// <param name="fileid">文件id</param>
        /// <param name="userid">用户id</param>
        /// <returns>yes 是  no 不是</returns>
        public static bool theFileIsCurrentLoginerWith(int fileid, int userid)
        {
            return t_class_user_fileupalod_DAL.theFileIsCurrentLoginerWith(fileid, userid);
        }

    }
}
